import axios from "@/api";

// 获取网关管理
export const getDictAPI = (paged: any, data: any) => {
  return axios({
    url: "/service/page/dictionary?paged=" + paged,
    method: "post",
    data
  });
};

export const addDictAPI = (data: any) => {
  return axios({
    url: "/service/dictionary",
    method: "post",
    data
  });
};

export const updateDictAPI = (data: any) => {
  return axios({
    url: "/service/dictionary",
    method: "put",
    data
  });
};
export const deleteDictAPI = (data: any) => {
  return axios({
    url: "/service/dictionary/?id=" + data,
    method: "delete",

  });
};


export const getDictBycodeAPI = (data: any) => {
  return axios({
    url: "/service/dictionary/" + data,
    method: "get",
    data
  });
};

export const getDictBycode2API = (data: any) => {
  return axios({
    url: "/service/dictionary/?ids=" + data,
    method: "get",
    data
  });
};

export const getDictBycode3API = (paged: any, pageSize: any, data: any) => {
  return axios({
    url: "/service/page/dictionary?paged=" + paged + "&pageSize=" + pageSize,
    method: "post",
    data
  });
};